<script>
	import {
		mapMutations
	} from "vuex"
	export default {
		onLaunch: function() {
			console.log('App Launch')

			//获取座位
			let diningTableList = uni.getStorageSync("diningTableList");
			if (diningTableList) {
				this.getDiningTableData(JSON.parse(diningTableList))
			}

			//获取菜品分类
			let categoryList = uni.getStorageSync("categoryList");
			if (categoryList) {
				this.getCategory(JSON.parse(categoryList));
			}
			//获取菜品
			let dishList = uni.getStorageSync("dishList");
			if (dishList) {
				this.getDish(JSON.parse(dishList));
			}

		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			...mapMutations(["getCategory", "getDiningTableData", "getDish"])
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	@import "@/style/common.scss"
</style>